#include "systick.h"


void SysTick_Delay_Nms(uint32_t Nms)
{
	if(Nms>1864)Nms=1864;
	
	SysTick->CTRL=0;
	SysTick->LOAD=Nms*9000-1;
	SysTick->CTRL=0x01;
	
	while((SysTick->CTRL&(1<<16))==0);
	SysTick->CTRL=0;
	SysTick->VAL=0;
}